Today I am going to describe you how to download Cake PHP framework and set up it.Ok let's start.
Visit the official website of Cake PHP.Below is the link.
http://cakephp.org/
Download the latest versio of Cake php framework form here.
Now unzip it to your htdocs(If you use XAMPP) or www(If you use WAMP) folder.
Now rename it as learncake.
Use a good text editor[preference one is sublime text].
* Drag and drop the above renamed folder to sublime text and you will see the following file stucture.
Visit the official website of Cake PHP.Below is the link.
http://cakephp.org/
Download the latest versio of Cake php framework form here.
Now unzip it to your htdocs(If you use XAMPP) or www(If you use WAMP) folder.
Now rename it as learncake.
Use a good text editor[preference one is sublime text].
* Drag and drop the above renamed folder to sublime text and you will see the following file stucture.
tart your local web server.
Now go to your favorite web browser and type below in address bar.
http://localhost/learncake/
* Now you will see the below type of thing in your web browser.
Now go to your favorite web browser and type below in address bar.
http://localhost/learncake/
* Now you will see the below type of thing in your web browser.
Now it is the time to do the configarations and solove the above visualized errors.
Go to the learncake folder and visit app folder and open config folder and open core.php file
[C:\xampp\htdocs\learncake\app\Config\core.php]
Find the below set of codes in ths file.
Configure::write('Security.salt', 'DYhG93b0qyJfIxfs2guVoUubWwvniR2G0FgaC9mi');
/**
* A random numeric string (digits only) used to encrypt/decrypt strings.
*/
Configure::write('Security.cipherSeed', '76859309657453542496749683645');
Then replace first character in the above codes as follows.[Below is the edited code]
Configure::write('Security.salt', 'MYhG93b0qyJfIxfs2guVoUubWwvniR2G0FgaC9mi');
/**
* A random numeric string (digits only) used to encrypt/decrypt strings.
*/
Configure::write('Security.cipherSeed', '96859309657453542496749683645');
Now again go to the web browser and type http://localhost/learncake/
and you will see that the errors are solved.
Now we have to config the database.
open the database file[database.php.default] in C:\xampp\htdocs\learncake\app\Config\ folder.
And now you have to create a database in phpmyadmin.
Type http://localhost/phpmyadmin in the web browser and create a new database called learncakedb .
*And you will see the folloing output
Now we have to edit the opened database.php.default file.
class DATABASE_CONFIG {
public $default = array(
'datasource' => 'Database/Mysql',
'persistent' => false,
'host' => 'localhost',
'login' => 'user',
'password' => 'password',
'database' => 'database_name',
'prefix' => '',
//'encoding' => 'utf8',
);
public $test = array(
'datasource' => 'Database/Mysql',
'persistent' => false,
'host' => 'localhost',
'login' => 'user',
'password' => 'password',
'database' => 'test_database_name',
'prefix' => '',
//'encoding' => 'utf8',
);
}
Now enter your my sql username in 'login' and default is root and the password is empty.
And enter the database name in 'database'.
Here is the edited database.php.default file.
class DATABASE_CONFIG {
public $default = array(
'datasource' => 'Database/Mysql',
'persistent' => false,
'host' => 'localhost',
'login' => 'root',
'password' => '',
'database' => 'learncakedb',
'prefix' => '',
//'encoding' => 'utf8',
);
public $test = array(
'datasource' => 'Database/Mysql',
'persistent' => false,
'host' => 'localhost',
'login' => 'user',
'password' => 'password',
'database' => 'test_database_name',
'prefix' => '',
//'encoding' => 'utf8',
);
}
And Eidt the database.php.default as database.php
Now again visit the web browser and type http://localhost/learncake/
And you will see the database configatarion has done.
Now it is ok..All the configurations have been done.
Now we have to install the debug kit.But it is not compalsory.
But I will expalain the way to do it also for you.
First visit the below site and download the all files as zip.
Then unzip this in to C:\xampp\htdocs\learncake\app\Plugin\ directory and rename the
folder as DebugKit.Then you have to do few easy things.
1. Open bootstrap.php[app/Config/bootstrap.php] and paste the below codes into it.
CakePlugin::load('DebugKit');
2. Open AppController.php in app/Controller/AppController.php and add below codes
public $components = array('DebugKit.Toolbar');
in to
class AppController extends Controller {
}
3.Open core.php in app/Config/core.php and add following codes to it.
Configure::write('debug', 1);
*Now it is all over go to web browser and type http://localhost/learncake/ you will see the fully completed outout as follows.
That is the end of setup and installation of cakephp..
-Ujitha Manujapriya Sudasingha-
-Ujitha Manujapriya Sudasingha-